package com.lanxiao.cloud.modules.oauth.controller.dubbo;

import com.lanxiao.cloud.modules.oauth.application.RoleQueryManager;
import com.lanxiao.cloud.oauth.api.RoleDubboApi;
import java.util.List;
import java.util.Map;
import org.apache.dubbo.config.annotation.DubboService;

/**
 * @author ：qiaoliang
 * @date ：2021-10-26
 */
@DubboService
public class RoleDuoobController implements RoleDubboApi {

  private final RoleQueryManager roleQueryManager;

  public RoleDuoobController(
      RoleQueryManager roleQueryManager) {
    this.roleQueryManager = roleQueryManager;
  }

  @Override
  public Map<Long, String> findByIds(List<Long> userIds) {
    return roleQueryManager.findByUserIds(userIds);
  }

}
